package cn.mjnxin.iot.base.log;

/**
 * 日志数据
 * @author CLG 2023年10月10日
 * @version V1.0.0
 */
public class LogData {
	private final String time;
	private final byte[] buf;
	private final String logMsg;
	private final boolean isRelease;

	public LogData(byte[] buf, String logMsg) {
		this(buf, logMsg, false);
	}

	public LogData(String time, byte[] buf, String logMsg) {
		this(time, buf, logMsg, false);
	}

	public LogData(byte[] buf, String logMsg, boolean isRelease) {
		this.time = null;
		this.buf = buf;
		this.logMsg = logMsg;
		this.isRelease = isRelease;
	}

	public LogData(String time, byte[] buf, String logMsg, boolean isRelease) {
		this.time = time;
		this.buf = buf;
		this.logMsg = logMsg;
		this.isRelease = isRelease;
	}

	public byte[] getBuf() {
		return buf;
	}

	public String getLogMsg() {
		return logMsg;
	}

	public boolean isRelease() {
		return isRelease;
	}

	/**
	 * @return the time
	 */
	public String getTime() {
		return time;
	}
}
